package com.doordu.soa.service.web.expection;

/***
 * 所有业务异常都应该使用该异常类,在业务无法继续时任意位置抛出此异常.<br>
 * 用户将查看到此错误信息
 * @author kyler.tang
 *
 */
public class BusinessException extends RuntimeException {

	private static final long serialVersionUID = 6543771869080181392L;
	
	private String code;
	private String msg;

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public BusinessException() {
		super();
	}

	public BusinessException(String message) {
		super(message);
	}
	
	public BusinessException(String code, String message) {
		super(message);
		this.code = code;
		this.msg = message;
	}

	public BusinessException(String message, Throwable cause) {
		super(message, cause);
		this.msg = message;
	}

	public BusinessException(Throwable cause) {
		super(cause);
	}

	protected BusinessException(String message, Throwable cause, boolean enableSuppression,
                                boolean writableStackTrace) {
		super(message, cause, enableSuppression, writableStackTrace);
		this.msg = message;
	}
}
